package lab02.Text05;

public class Cube {
    //长宽高
    int length;
    int weight;
    int height;
    //行为：变量初始化、体积
    int volume() {
        System.out.println("立方体的体积为:" + length * weight * height);
        return 0;
    }
    //构造函数
    //main函数
    public static void main(String[] args) {
        Cube a=null;
        a=new Cube();
        a.height=3;
        a.weight=2;
        a.length=4;
        a.volume();

    }
}
